package com.zy.cat.entity.dev;

import java.util.UUID;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Index;
import javax.persistence.Table;

import com.zy.cat.entity.primary.CatDevSignedHistoryPrimary;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * @info 9趣猫用户签到红包历史纪录
 * @author Link
 * @date 2019-10-30 09:14
 */
@Entity
@Table(name = "zy_cat_user_signed_beans_history", indexes = {
		@Index(name = "pid", columnList = "pid"),
		@Index(name = "stime", columnList = "stime")
		 })
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("9趣猫用户签到红包历史纪录")
@IdClass(CatDevSignedHistoryPrimary.class)
public class CatDevSignedBeansHistory {
 
	@Id
	@Column(columnDefinition = "VARCHAR(20) NOT NULL COMMENT '用户账号ID[9趣猫用户签到红包历史纪录]'")
	@ApiModelProperty(value = "用户账号ID", example = "fe53d6a4fa29641")
	private String pid;
	
	@Id
	@Column(columnDefinition = "VARCHAR(20) NOT NULL  COMMENT '签到奖励时间'")
	@ApiModelProperty(value = "签到奖励时间", example = "2019-02-22 08:30:00")
	private String stime;
	
	@Column(columnDefinition = "INT(5) NOT NULL  COMMENT '签到奖励'")
	@ApiModelProperty(value = "签到奖励", example = "50")
	private int dcount;
	
	@Column(columnDefinition = "CHAR(32) NOT NULL  COMMENT '中奖翻倍ID'")
	@ApiModelProperty(value = "中奖翻倍ID", example = "c9adb120ca2b48f88626ebd35000fa08")
	private String fid=UUID.randomUUID().toString().replace("-", "");
	
	@Column(columnDefinition = "INT(2) DEFAULT '0' COMMENT '奖励翻倍（0.未翻倍、1.已经翻倍）'")
	@ApiModelProperty(value = "奖励翻倍（0.未翻倍、1.已经翻倍）", example = "0")
	private int fstatus;
	
	@Column(columnDefinition = "INT(5) DEFAULT '0'  COMMENT '是否为七天签到红包(0.非七天签到红包、1.七天签到红包'")
	@ApiModelProperty(value = "是否为七天签到红包(0.非七天签到红包、1.七天签到红包", example = "0")
	private int dtype;
	
	@Column(columnDefinition = "INT(2) DEFAULT '1' COMMENT '领取状态，（-1：不结算、0.结算中、1.已结算）'")
	@ApiModelProperty(value = "领取状态，（-1：不结算、0.结算中、1.已结算）", example = "1")
	private int dstatus;
	
	@Column(columnDefinition = "VARCHAR(20) NOT NULL  COMMENT '更新时间'")
	@ApiModelProperty(value = "更新时间", example = "2019-11-22 10:10:10")
	private String ltime;

	public CatDevSignedBeansHistory(String pid) {
		super();
		this.pid = pid;
	}

	public CatDevSignedBeansHistory(String pid, String fid) {
		super();
		this.pid = pid;
		this.fid = fid;
	}

	public CatDevSignedBeansHistory(String pid, String stime, int dcount, int dtype,int dstatus, String ltime) {
		super();
		this.pid = pid;
		this.stime = stime;
		this.dcount = dcount;
		this.dtype = dtype;
		this.dstatus=dstatus;
		this.ltime = ltime;
	}
	
	
	
}
